package com.gc.jbnfgen.demo;

import com.gc.sql.ddl.*;

/**
 *
 * @author dmitry.mamonov
 */
public class SqlDemo {
    public static void main(String[] args) {
        Sql sql = Sql.create(CreateTable.builder()
                .create()
                .name(new Name("table1"))
                .openBr().newLine()
                    .columnsList(ColumnsList.builder()
                    .columns(ColumnDef.builder()
                        .name(new Name("c1"))
                        .type(new Type(255))
                        .nullCheck(NullCheck.createNotNull())
                        .defaultValue(DefaultValue.createNoDefault())
                        )
                    .next(ColumnsSubList.create(ListCompleted.builder().newLine().closeBr()))));
        System.out.println("sql = "+sql);
    }
}
